<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<!-- 
See javadoc API for class org.thymeleaf.expression.Numbers

设置最小整数位数。也适用于数组、列表或集合
${#numbers.formatInteger(num,3)}
${#numbers.arrayFormatInteger(numArray,3)}
${#numbers.listFormatInteger(numList,3)}
${#numbers.setFormatInteger(numSet,3)}
设置最小整数位数和千位分隔符：“point”、“comma”、“whitespace”、“none”或“default”（按区域设置）。
也适用于数组、列表或集合
${#numbers.formatInteger(num,3,'POINT')}
${#numbers.arrayFormatInteger(numArray,3,'POINT')}
${#numbers.listFormatInteger(numList,3,'POINT')}
${#numbers.setFormatInteger(numSet,3,'POINT')}
设置最小整数位数和（精确）小数位数。也适用于数组、列表或集合
${#numbers.formatDecimal(num,3,2)}
${#numbers.arrayFormatDecimal(numArray,3,2)}
${#numbers.listFormatDecimal(numList,3,2)}
${#numbers.setFormatDecimal(numSet,3,2)}
设置最小整数位数和（精确）小数位数，以及小数分隔符。也适用于数组、列表或集合
${#numbers.formatDecimal(num,3,2,'COMMA')}
${#numbers.arrayFormatDecimal(numArray,3,2,'COMMA')}
${#numbers.listFormatDecimal(numList,3,2,'COMMA')}
${#numbers.setFormatDecimal(numSet,3,2,'COMMA')}

设置最小整数位数和（精确）小数位数，以及千和小数分隔符。s也适用于数组、列表或集合
${#numbers.formatDecimal(num,3,'POINT',2,'COMMA')}
${#numbers.arrayFormatDecimal(numArray,3,'POINT',2,'COMMA')}
${#numbers.listFormatDecimal(numList,3,'POINT',2,'COMMA')}
${#numbers.setFormatDecimal(numSet,3,'POINT',2,'COMMA')}
格式化货币
${#numbers.formatCurrency(num)}
${#numbers.arrayFormatCurrency(numArray)}
${#numbers.listFormatCurrency(numList)}
${#numbers.setFormatCurrency(numSet)}
格式化百分比
${#numbers.formatPercent(num)}
${#numbers.arrayFormatPercent(numArray)}
${#numbers.listFormatPercent(numList)}
${#numbers.setFormatPercent(numSet)}
设置最小整数位数和（精确）小数位数。
${#numbers.formatPercent(num, 3, 2)}
${#numbers.arrayFormatPercent(numArray, 3, 2)}
${#numbers.listFormatPercent(numList, 3, 2)}
${#numbers.setFormatPercent(numSet, 3, 2)}
创建从x到y的整数序列（数组）
${#numbers.sequence(from,to)}
${#numbers.sequence(from,to,step)}

 -->
<p th:text="${#numbers.formatInteger('123',4)}"></p>
<p th:text="${#numbers.formatInteger('123',3)}"></p>
<p th:text="${#numbers.formatInteger('123',2)}"></p>
<br>-------------------------------------<br>
<p th:text="${#numbers.listFormatInteger(numList,3)}"></p>
<br>-------------------------------------<br>
<p th:text="${#numbers.formatInteger('1000',2,'POINT')}"></p>
<p th:text="${#numbers.formatInteger('1000',6,'POINT')}"></p>
<p th:text="${#numbers.formatInteger('1000',7,'POINT')}"></p>
<br>-------------------------------------<br>
<p th:text="${#numbers.formatInteger('1000',2,'COMMA')}"></p>
<p th:text="${#numbers.formatInteger('1000',2,'WHITESPACE')}"></p>
<p th:text="${#numbers.formatInteger('1000',2,'NONE')}"></p>
<p th:text="${#numbers.formatInteger('1000',2,'DEFAULT')}"></p>
<br>-------------------------------------<br>
<!-- 设置最小整数位数和（精确）小数位数。也适用于数组、列表或集合  -->
<p th:text="${#numbers.formatDecimal('10.123',3,2)}"></p>
<br>-------------------------------------<br>
<p th:text="${#numbers.formatDecimal('1000.123',5,'POINT',2,'COMMA')}"></p>
<br>-------------------------------------<br>
<p th:text="${#numbers.formatCurrency('1000')}"></p>
<br>-------------------------------------<br>
<p th:text="${#numbers.formatPercent('0.2',2, 4)}"></p>
<p th:text="${#numbers.formatPercent('0.2',3, 2)}"></p>
<br>-------------------------------------<br>
<div th:each="num : ${#numbers.sequence(0,4)}" >
          <p th:text="${num}"></p>
</div>
<br>-------------------------------------<br>
<div th:each="num : ${#numbers.sequence(0,4,1)}" >
         <p th:text="${num}"></p>
</div>
<br>-------------------------------------<br>
<div th:each="num : ${#numbers.sequence(0,4,2)}" >
         <p th:text="${num}"></p>
</div>

</body>
</html>